package controllers

import (
	"ai/ai_control/utils/log"
	"newAi/new_web/models"
)

type ReportController struct {
	BaseController
}

//统计报表
func (self *ReportController) Report() {
	self.display()
}

func (self *ReportController) SearchCdrStute(){
	cdrInfo := make(map[string]interface{}, 0)

	//start := self.FormatTimes(self.GetString("startDate"))
	//end := self.FormatTimes(self.GetString("endDate"))
	start := self.GetString("startDate")
	end := self.GetString("endDate")
	arrs, err := models.Reportcdr(start, end, self.userId)
	if err != nil {
		logger.Error("查询当天出问题")
	}

	cdrInfo["data"] = arrs

	self.ajaxMsg(cdrInfo, MSG_OK)
}